package com.dd.cloud.gateway;

//import com.dd.cloud.common.component.FeignRequestInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * 1,开启服务的注册发现, 配置注册中心地址
 * exclude = {DataSourceAutoConfiguration.class} 排除这个配置, 网关不需要连接数据库, 所以排除
 * @author admin
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
//服务注册
@EnableDiscoveryClient
@ComponentScan(basePackages = {
        "com.dd.cloud.gateway",
        "com.dd.cloud.common.config.cookie",
        "com.dd.cloud.common.config.common",
        "com.dd.cloud.common.config.redis"
})
@EnableFeignClients
//nacos配置实时刷新
@RefreshScope
public class DdGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(DdGatewayApplication.class, args);
    }

}
